import { ElMessage } from 'element-plus';

// 显示消息的方法
const showMessage = (response:any) => {
  if (response.data.status === 'success') {
    ElMessage({
      message: `${response.data.result}`,
      type: 'success',
    });
  } else {
    ElMessage({
      message: `${response.data.message}`,
      type: 'error',
    });
  }
};

export default showMessage;
